<dependency> <groupId>org.switchyard.components</groupId> <artifactId>switchyard-component-camel-ftp</artifactId> <version>SWITCHYARD-VERSION</version> </dependency>
SwitchYard provides support for remote file systems on both sides service and reference.
The ftp binding is built on top of camel-ftp and supports most of options for this endpoint. Please refer camel documentation for detailed description of them.
This binding have it's own namespace. To use it you must declare namespace with uri urn:switchyard-component-camel-ftp:config:1.0. Your Maven project should also have following dependency:
<dependency> <groupId>org.switchyard.components</groupId> <artifactId>switchyard-component-camel-ftp</artifactId> <version>SWITCHYARD-VERSION</version> </dependency>
Following options can be apiled to <binding.ftp> <binding.ftps> and <binding.sftp> definition:
host
port
username
password
binary
connectTimeout
disconnect
maximumReconnectAttempts
reconnectDelay
separator
stepwise
throwExceptionOnConnectFailed
passiveMode
timeout
soTimeout
siteCommand
securityProtocol
isImplicit
execPbsz
execProt
disableSecureDataChannelDefaults
knownHostsFile
privateKeyFile
privateKeyFilePassphrase
Supported options are same as for File Binding.
Here's an example of what a file service binding looks like:
<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0"> <sca:service name="GreetingService" promote="GreetingService"> <camel:binding.ftp> <camel:directory>target/input</camel:directory> <camel:host>localhost</camel:host> <camel:port>22</camel:port> <camel:username>camel</camel:username> <camel:password>secret</camel:password> <camel:consume> <camel:initialDelay>50</camel:initialDelay> <camel:delete>true</camel:delete> </camel:consume> </camel:binding.file> </sca:service> </sca:composite>
Binding a reference with file can be used to store outcome of service on remote server. All File Binding referene properties are supported.
<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0"> <sca:reference name="GreetingService" promote="camel-binding/GreetingService" multiplicity="1..1"> <camel:binding.ftp> <camel:directory>target/output</camel:directory> <camel:autoCreate>false</camel:autoCreate> <camel:host>localhost</camel:host> <camel:port>22</camel:port> <camel:username>camel</camel:username> <camel:password>secret</camel:password> <camel:produce> <camel:fileExist>Override</camel:fileExist> </camel:produce> <camel:binding.ftp> </sca:reference> </sca:composite>